﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ZK.Common;

namespace ZK.YHP_TransManage.Test
{
    public partial class Index : Form
    {
        public Index()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 红外光栅页面打开");
            红外测试 i = new 红外测试();
            i.ShowDialog();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 地磅测试页面打开");
            地磅 i = new 地磅();
            i.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 海康车牌识别页面打开");
            HikvisonTest i = new HikvisonTest();
            i.ShowDialog();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 领军红绿灯页面打开");
            领军红绿灯测试 i = new 领军红绿灯测试();
            i.ShowDialog();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 6k1led测试页面打开");
            _6K1LED测试 i = new _6K1LED测试();
            i.ShowDialog();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 远瑞通室外读卡器页面打开");
            远瑞通室外读卡器test i = new 远瑞通室外读卡器test();
            i.ShowDialog();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 明华读卡器页面打开");
            MingHuaReaderTest i = new MingHuaReaderTest();
            i.ShowDialog();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 菱声音响页面打开");
            菱声音响测试 i = new 菱声音响测试();
            i.ShowDialog();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 泥人网络继电器页面打开");
            泥人网络继电器 i = new 泥人网络继电器();
            i.ShowDialog();
        }

        private void button10_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 windows 服务注册卸载页面打开");
            WindowsServiceInstall快捷键 i = new WindowsServiceInstall快捷键();
            i.ShowDialog();
        }

        private void button11_Click(object sender, EventArgs e)
        {
            
                 Common.ShowBlackBox.WriteLine("1 菱声接口版音响测试页面打开");
            菱声接口版音响测试 i = new 菱声接口版音响测试();
            i.ShowDialog();
        }

        private void button12_Click(object sender, EventArgs e)
        {

            Common.ShowBlackBox.WriteLine("1 文字转语音页面打开");
            文字转语音 i = new  文字转语音();
            i.ShowDialog();
        }

        private void button13_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 socket客户端打开");
            SocketClient i = new SocketClient();
            i.Show();
        }

        private void button14_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 socket服务端打开");
            SocketServer i = new SocketServer();
            i.Show();
        }

        private void button15_Click(object sender, EventArgs e)
        {
            string filePath = RouteHelper.PicturePath;
            if (Directory.Exists(filePath))
            {
                var directories = Directory.GetDirectories(filePath);
                foreach (var item in directories)
                {
                    var info = new DirectoryInfo(item);
                    if (info.Exists && (info.Attributes & FileAttributes.Directory) != 0 &&
                        info.CreationTime < DateTime.Now.AddDays(-7))
                        Directory.Delete(item, true);
                }
            }
        }

        private void button16_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 煤管票打开");
            煤管票 i = new 煤管票();
            i.Show();
        }

        private void button17_Click(object sender, EventArgs e)
        {
            MessageBox.Show("123qwe");

            IA a = new A();
        }

        private void button18_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 菱声文字转语音直接播放");
            菱声文字转语音直接播放 i = new 菱声文字转语音直接播放();
            i.Show();
        }

        private void button19_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 _6E1XLED测试new");
            _6E1XLED测试 i = new _6E1XLED测试();
            i.Show();
        }

        private void button20_Click(object sender, EventArgs e)
        {
            Common.ShowBlackBox.WriteLine("1 _232串口服务器测试");
            _232串口服务器测试 i = new _232串口服务器测试();
            i.Show();
        }
    }

    public interface IA
    {
    }
    public class A :IA
    {
        public A()
        {
            var aaa = "234";
        }
    }
}
